package com.lhd.creational.singleton.demo03;

/**
 * @Author: liuhd
 * @Date: 2024/10/19 17:01
 * @Description: 线程不安全的懒汉式单例
 */
public class Singleton {
    private static Singleton singleton;
    private Singleton(){}
    public static Singleton getInstance(){
        if (singleton == null){
            singleton = new Singleton();
        }
        return singleton;
    }
}
